package com.party.business.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.party.business.domain.TKcviewFinish;
import com.party.business.mapper.TKcviewFinishMapper;
import com.party.business.service.ITKcviewFinishService;
import com.party.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 课程完成记录Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-28
 */
@Service
public class TKcviewFinishServiceImpl extends ServiceImpl<TKcviewFinishMapper, TKcviewFinish>  implements ITKcviewFinishService
{
    @Autowired
    private TKcviewFinishMapper tKcviewFinishMapper;

    /**
     * 查询课程完成记录
     *
     * @param id 课程完成记录主键
     * @return 课程完成记录
     */
    @Override
    public TKcviewFinish selectTKcviewFinishById(String id)
    {
        return tKcviewFinishMapper.selectTKcviewFinishById(id);
    }

    /**
     * 查询课程完成记录列表
     *
     * @param tKcviewFinish 课程完成记录
     * @return 课程完成记录
     */
    @Override
    public List<TKcviewFinish> selectTKcviewFinishList(TKcviewFinish tKcviewFinish)
    {
        return tKcviewFinishMapper.selectTKcviewFinishList(tKcviewFinish);
    }

    /**
     * 新增课程完成记录
     *
     * @param tKcviewFinish 课程完成记录
     * @return 结果
     */
    @Override
    public int insertTKcviewFinish(TKcviewFinish tKcviewFinish)
    {
                tKcviewFinish.setCreateTime(DateUtils.getNowDate());
            return tKcviewFinishMapper.insertTKcviewFinish(tKcviewFinish);
    }

    /**
     * 修改课程完成记录
     *
     * @param tKcviewFinish 课程完成记录
     * @return 结果
     */
    @Override
    public int updateTKcviewFinish(TKcviewFinish tKcviewFinish)
    {
                tKcviewFinish.setUpdateTime(DateUtils.getNowDate());
        return tKcviewFinishMapper.updateTKcviewFinish(tKcviewFinish);
    }

    /**
     * 批量删除课程完成记录
     *
     * @param ids 需要删除的课程完成记录主键
     * @return 结果
     */
    @Override
    public int deleteTKcviewFinishByIds(String[] ids)
    {
        return tKcviewFinishMapper.deleteTKcviewFinishByIds(ids);
    }

    /**
     * 删除课程完成记录信息
     *
     * @param id 课程完成记录主键
     * @return 结果
     */
    @Override
    public int deleteTKcviewFinishById(String id)
    {
        return tKcviewFinishMapper.deleteTKcviewFinishById(id);
    }
}
